package hxy.dragon.ktor.model

import kotlinx.serialization.Serializable
import org.jetbrains.exposed.v1.core.Table

/**
 * @description
 * @author HOX4SGH
 * @date 2024/7/13
 * 好像也就只有两个实体，一个参数，一个数据库表实体
 */

object Users : Table() {
	val id = integer("id").autoIncrement()
	val name = varchar("name", length = 50)
	val age = integer("age")

	override val primaryKey = PrimaryKey(id)
}

@Serializable
data class ExposedUser(val id: Int? = null, val name: String, val age: Int)